1. Field
The present disclosure pertains to the field of information processing, and more particularly, to the field of virtualization.
2. Description of Related Art
Generally, the concept of virtualization in information processing systems allows multiple instances of one or more operating systems (each, an “OS”) to run on a single information processing system, even though each OS is designed to have complete, direct control over the system and its resources. Virtualization is typically implemented by using software (e.g., a virtual machine monitor, or a “VMM”) to present to each OS a “virtual machine” (“VM”) having virtual resources, including one or more virtual processors, that the OS may completely and directly control, while the VMM maintains a system environment for implementing virtualization policies such as sharing and/or allocating the physical resources among the VMs (the “virtualization environment”). Each OS, and any other software, that runs on a VM is referred to as a “guest” or as “guest software,” while a “host” or “host software” is software, such as a VMM, that runs outside of the virtualization environment.
A processor in an information processing apparatus may support virtualization, for example, by operating in two modes—a “root” mode in which software runs directly on the hardware, outside of any virtualization environment, and a “non-root” mode in which software runs at its intended privilege level, but within a virtualization environment hosted by a VMM running in root mode. In the virtualization environment, certain events, operations, and situations, such as external interrupts or attempts to access privileged registers or resources, may be intercepted, i.e., cause the processor to exit the virtualization environment so that a VMM may operate, for example, to implement virtualization policies. The processor may support instructions for establishing, entering, exiting, and maintaining a virtualization environment, and may include register bits or other structures that indicate or control virtualization capabilities of the processor.
A physical processor supporting a virtualization environment may also support an activity state feature for power management or another purpose. An activity state feature may provide for the processor to transition between various activity states, such as an active state, a wait state, and a halt state. These states may be classified as active or inactive, where an active state may be one in which the processor is executing instructions, and an inactive state may be one in which the processor is not executing instructions. The processor may transition between activity states based on the execution of special instructions or the detection of special bus messages or other communications. A processor may issue special messages or other communications to inform other processors, chipsets, or other components that it is transitioning between activity states.
The execution by a guest of an instruction that would, outside of a virtualization environment, cause a processor to enter an inactive state may be intercepted so that the VMM may keep the processor in an active state for itself and other guests.